﻿using AutoMapper;
using BCDto.MakeStaticPagingComponent.MakeStaticPaging;
using BCDto.MakeStaticPagingComponent.PageTemplate;
using BCDto.MakeStaticPagingComponent.PageTemplateAttachment;
using BCDto.MakeStaticPagingComponent.SystemServiceListing;
using BCDto.MakeStaticPagingComponent.TemplateTag;
using BCDto.MakeStaticPagingComponent.WebsiteTemplate;
using BCDto.MakeStaticPagingComponent.WebsiteTemplateAttachment;
using BCEntity.MakeStaticPagingComponent.PageTemplate;
using BCEntity.MakeStaticPagingComponent.PageTemplateAttachment;
using BCEntity.MakeStaticPagingComponent.SystemServiceListing;
using BCEntity.MakeStaticPagingComponent.TemplateTag;
using BCEntity.MakeStaticPagingComponent.WebsiteTemplate;
using BCEntity.MakeStaticPagingComponent.WebsiteTemplateAttachment;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.MapperProfiles.MakeStaticPagingComponent
{
    public class MakeStaticPagingComponentProfile : Profile
    {
        public MakeStaticPagingComponentProfile()
        {
            CreateMap<PageTemplateEntity, PageTemplateDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<PageTemplateDto, PageTemplateEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<PageTemplateRequestDto, PageTemplateEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<PageTemplateEntity, MakeStaticPagingTaskDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //页面模板附件
            CreateMap<PageTemplateAttachmentDto, PageTemplateAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<PageTemplateAttachmentRequestDto, PageTemplateAttachmentPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<PageTemplateAttachmentRequestDto, PageTemplateAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<PageTemplateAttachmentPutDto, PageTemplateAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<PageTemplateAttachmentEntity, PageTemplateAttachmentDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<SystemServiceListingEntity, SystemServiceListingDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SystemServiceListingDto, SystemServiceListingEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<SystemServiceListingRequestDto, SystemServiceListingEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<TemplateTagEntity, TemplateTagDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TemplateTagDto, TemplateTagEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TemplateTagRequestDto, TemplateTagEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<WebsiteTemplateEntity, WebsiteTemplateDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteTemplateDto, WebsiteTemplateEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteTemplateRequestDto, WebsiteTemplateEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //网站模板附件
            CreateMap<WebsiteTemplateAttachmentDto, WebsiteTemplateAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteTemplateAttachmentRequestDto, WebsiteTemplateAttachmentPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteTemplateAttachmentRequestDto, WebsiteTemplateAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteTemplateAttachmentPutDto, WebsiteTemplateAttachmentEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteTemplateAttachmentEntity, WebsiteTemplateAttachmentDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
